/*
 * 4.5.cpp
 *
 *  Created on: 2012-5-18
 *      Author: jawinton
 */

#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>

using namespace std;

#define LEN 201
char code[27] = "VWXYZABCDEFGHIJKLMNOPQRSTU";

int main (void) {
	char start[15], end[10];
	char str[LEN];
	while (true) {
		gets(start);
		if (strcmp(start, "ENDOFINPUT") == 0) break;
		gets(str);
		for (int i=0; i<strlen(str); i++) {
			if (str[i] >= 'A' && str[i] <= 'Z')
				str[i] = code[str[i]-'A'];
		}
		gets(end);
		cout << str << endl;
	}
	return 0;
}
